package com.guguguweb.rpc.Test.service.imp;

import com.guguguweb.rpc.Test.service.HelloService;
import com.guguguweb.rpc.annotation.GuRPCServerService;

import java.util.concurrent.ThreadLocalRandom;
import java.util.concurrent.atomic.AtomicInteger;


@GuRPCServerService
public class HelloServiceImp implements HelloService {

    private AtomicInteger count = new AtomicInteger(0);


    @Override
    public String sendHello(String msg) {
        count.incrementAndGet();
        return msg +",已经处理次数为 ： "+count.get() +"，我产生的数据是：" +ThreadLocalRandom.current().nextInt() ;
    }
}
